#include "graph.h"
int main()
{
    Graph * graph=new Graph(5);
    graph->addEdge(0,1,10);
    graph->addEdge(0,2,5);
    graph->addEdge(1,2,2);
    graph->addEdge(1,3,1);
    graph->addEdge(2,1,3);
    graph->addEdge(2,3,9);
    graph->addEdge(2,4,2);
    graph->addEdge(3,4,4);
    graph->addEdge(4,0,7);
    graph->addEdge(4,3,6);
    //graph->printMap();
    graph->dijkstra(0);
    delete graph;
    graph=new Graph(5);
    graph->addEdge(0,1,6);
    graph->addEdge(0,2,7);
    graph->addEdge(1,2,8);
    graph->addEdge(1,3,5);
    graph->addEdge(1,4,-4);
    graph->addEdge(2,3,-3);
    graph->addEdge(2,4,9);
    graph->addEdge(3,1,-2);
    graph->addEdge(4,0,2);
    graph->addEdge(4,3,7);
    graph->bellmanFord(0);
    delete graph;
    return 0;
}
